<?php

namespace App\Http\Requests\Admin;

use Illuminate\Foundation\Http\FormRequest;

class ConfigRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return [
            'company' => [
                'required'
            ],
            'address' => [
                'required'
            ],
            'phone' => [
                'required'
            ]
        ];
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'company.required'=>"公司名称不能空",
            'address.required'=>"公司地址不能空",
            'phone.required'=>"客户热线不能空"
        ];
    }
}
